BackupsService

Constructors

Link copied to clipboard
constructor(client: PocketbaseClient)

Types

Link copied to clipboard
@Serializable
data class Backup(val key: String, val modified: String, val size: Long)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun create(name: String? = null): Boolean

Creates a new app data backup. This action will return an error if the backup to delete is still being generated or part of a restore operation.

Link copied to clipboard
suspend fun delete(key: String): Boolean

Deletes a single backup by name This action will return an error if the backup to delete is still being generated or part of a restore operation.

Link copied to clipboard
fun getBackupUrl(key: String, token: String): String

Gets the url to download a single backup file.

Link copied to clipboard
suspend fun getFullList(fields: ShowFields = ShowFields()): List<BackupsService.Backup>

Returns a list of all available back up files.

Link copied to clipboard
suspend fun restore(key: String): Boolean

Restore a single backup by its name and restarts the current running PocketBase process. This action will return an error if the backup to delete is still being generated or part of a restore operation.

Link copied to clipboard
suspend fun upload(file: FileUpload)